﻿<div ms-controller="FFJLLIST">
    <!-- 按条件选择 -->
    <div class="tab-filter-type">
      
        <!-- 搜索 -->
        <div class="oh">
            <div class="input-group ml15" style="width: 300px; float: left;">
                <input type="search" class="form-control" ms-duplex="search.searchcontent" placeholder="搜索标题" style="height: 30px">
                <span class="input-group-addon" ms-click="GetLIST()">搜索</span>
            </div>
        </div>
    </div>
    <!-- 展开更多选项 -->
    <div class="add-tab ft14 tc mt20" style="display: none;">
        <span>更多筛选<i class="caret"></i></span>
    </div>
    <!-- 表格 -->
    <div class="default-tab ft14 pt20">
        <table class="table table-striped table-responsive table-hover">
            <thead>
                <tr>
                    <th class="tc width-70">
                        序号
                    </th>
                    <th>标题</th>
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th width="80px"></th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat-el="ListData" ms-on-mouseover="mouseover" ms-on-mouseout="mouseout" ms-click="VIEWFFJL(el.ID)">
                    <td class="tc">
                        {{$index+1}}
                    </td>
                    <td>{{el.title}}</td>
                    <td>{{ComFunJS.convertuser(el.CRUser)}}</td>
                    <td>{{el.CRDate|date('yyyy-MM-dd HH:mm')}}</td>
                    <td>
                        <span class="tool" style="display: none;">
                            <a class="cz-btn ft18 bj-color tip" data-toggle="modal" title="查看" data-target="#gzdlook" ms-click="selusergz(el)">
                                <i class="iconfont icon-look"></i>
                            </a>
                        </span>
                    </td>
                </tr>
            </tbody>
            <tfoot>
                <tr ms-if="isnull">
                    <td class="tc"></td>
                    <td>暂无数据</td>
                </tr>
            </tfoot>
        </table>
        <div class="fy-list">
            <div id="pageDiv" ms-if="ListData.size()!=0" class="pull-right"></div>
            <div class="pull-right" ms-if="ListData.size()!=0">
                <span>共{{model.page.total}}条记录</span>
                选择每页条数
                <select style="height: 25px; width: 50px;" ms-change="selNum(this.value)" ms-duplex="model.page.pagecount">
                    <option ms-repeat-pg="pageNum" ms-attr-value="pg.num" ms-attr-selected="pg.num==model.page.pagecount?'selected':''">{{pg.num}}</option>
                </select>
            </div>
        </div>
    </div>

</div>

<script>

    var tempindex = avalon.define({
        $id: "FFJLLIST",
        curXJType: "",
        curXJTime: "",
        starTime: "",
        endTime: "",
        SelectType: function (type) {
            model.search.seartype = type;
            tempindex.GetLIST();
        },
        seluser: {},
        selsjuser: {},
        selusergz: function (item) {
            tempindex.seluser = item;
            tempindex.selsjuser = JSON.parse(item.salaryData);
        },
        selNum: function (item) {    //选择显示的条数
            model.page.pagecount = item;
            tempindex.GetLIST();
        },
        InitWigetData: function () {
            //类型数据
            tempindex.GetLIST();
            ComFunJS.initForm();
        },
        VIEWFFJL: function (id) {
            ComFunJS.winviewform("/ViewV5/AppPage/XZGL/FFJLVIEW.html?ID=" + id + "&r=" + Math.random(), "发放信息", '1000');
        },
        GetLIST: function () {
            model.page.pageindex = 1;
            model.ListData.clear();
            $.getJSON('/API/VIEWAPI.ashx?Action=XZGL_GETFFJLLIST',
                {
                    p: 1,
                    P1: model.search.seartype,
                    Content: model.search.searchcontent,
                    pagecount: model.page.pagecount,
                }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.ListData = resultData.Result;
                        if (model.ListData.size() == 0) { model.isnull = true; } else { model.isnull = false; }
                        model.page.total = resultData.Result1;
                        laypage({
                            cont: 'pageDiv', //容器。值支持id名、原生dom对象，jquery对象。
                            pages: Math.ceil(parseInt(resultData.Result1) * 1.0 / model.page.pagecount), //
                            curr: 1, //初始化当前页
                            skin: 'molv',
                            jump: function (e) { //触发分页后的回调
                                if (e.curr != model.page.pageindex) {
                                    $.getJSON('/API/VIEWAPI.ashx?Action=XZGL_GETFFJLLIST',
                                        {
                                            p: e.curr,
                                            P1: model.search.seartype,
                                            Content: model.search.searchcontent,
                                            pagecount: model.page.pagecount,
                                        }, function (resultData) {
                                            if (resultData.ErrorMsg == "") {
                                                model.ListData = resultData.Result;
                                            }
                                        })
                                    model.page.pageindex = e.curr;
                                }
                            }
                        });
                    }
                })
        }
    })
    //# sourceURL=FFJLLIST.js;
</script>
